import request from '@/utils/request'
export function getPermListAPI() {
  return request({
    url: '/sys/permission'
  })
}
// 删除
export function deleteAPI(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'delete'
  })
}
// 编辑权限接口
export function editPermAPI(data) {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}
// 编辑数据回显
export function getPermDetailAPI(id) {
  return request({
    url: `/sys/permission/${id}`
  })
}
// 添加权限
export function addPermAPI(data) {
  return request({
    url: `/sys/permission`,
    method: 'post',
    data
  })
}
